Method and apparatus for performing timed functions in a wireless electronic device

ABSTRACT

Methods and apparatus for performing timed functions in battery-powered, wireless electronic devices, such as sensors or control modules. Such electronic devices comprise a main processor and a co-processor. When the main processor enters a quiescent state in order to preserve battery life, one or more timed functions are transferred from the main processor to the co-processor just before the main processor enters the quiescent state. When the co-processor determines that it is time to perform the timed function, the co-processor wakes the main processor in order for the main processor to perform the timed function.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. patent applicationSer. No. 16/851,953, filed on Apr. 17, 2020 (now U.S. Pat. No.11,126,256).

BACKGROUND I. Field of Use

The present application relates to the field of wireless sensors. Morespecifically, the present application relates to techniques to increasebattery life in battery-operated wireless sensors.

II. Description of the Related Art

Wireless sensors are used to detect a wide variety of remote, physicalconditions, such as the status of a door or window (i.e., open, closed),the occurrence of motion, the presence of heat, ambient temperatures,vibration, shock, glass breakage, thermal readings, light detection,etc. Such sensors find widespread application in a variety ofindustries, including home security, home automation, HVAC, andindustrial applications. These sensors are often wireless,battery-powered devices, enabling them to easily be placed in remotelocations within a home or industrial setting.

Until recently, in order to preserve battery life, sensors were designedas transmit-only devices, i.e., they did not contain a receiver, due tothe additional power consumption required by such a receiver. However,recent technological improvements have made battery-powered, two-waysensors (comprising a transmitter and a receiver), a reality. Forexample, new Z-Wave® 700 series transceiver chips are available fromSilicon Laboratories, Inc. of Austin, Tex. that contain both atransmitter and a receiver and consume very low power during operation.

The Z-wave 700 series transceiver chips operate in accordance with aZ-wave 700 series communication protocol that allows sensors to relayinformation over relatively large distances. Sensors that operate inthis way are commonly referred to as “mesh” sensors that operatetogether with other mesh sensors to form a “mesh” network. Other commonmesh network technologies include the well-known Zigbee® and Insteon®technologies.

One problem with the new Z-wave 700 series transceiver chips is thatthey do not maintain accurate time when they are placed into alow-power, quiescent state. The quiescent state is used in order toconserve battery life in battery-powered sensors. However, suchbattery-powered sensors must generally transmit certain time-sensitivemessages during the quiescent state, such as indications of remainingbattery life or supervisory messages.

Another problem with battery-powered sensors in general is in the waythe remaining battery life is determined. In many prior-art sensors, aprocessor measures a voltage drop during a high-current draw event, suchas when an LED is illuminated, or when a sensor is transmitting.However, in the case of measuring remaining battery life during messagetransmission, message transmission may become corrupt if a battery lifedetermination is made at the same time of transmission.

It would be desirable to overcome the problems inherent in prior-art,battery-powered, wireless sensors.

SUMMARY

The embodiments described herein relate to methods, systems, andapparatus for performing timed functions in a battery-powered, wirelesselectronic device, such as a sensor or control module. In oneembodiment, a battery-powered, electronic device, comprises a detectorfor detecting an event in proximity to the electronic device, atransceiver for transmitting and receiving messages, a first memory forstoring main processor-executable instructions, a second memory forstoring co-processor-executable instructions, a main processor coupledto the detector, the first memory and the transceiver for executing themain processor-executable instructions, and a co-processor coupled tothe second memory for executing the co-processor-executable instructionsthat causes the co-processor to determine that the main processor hasentered a quiescent state, start a timer in response to determining thatthe main processor has entered the quiescent state, and wake the mainprocessor upon expiration of the timer.

In another embodiment, a method is described for performing timedfunctions in a battery-powered, wireless electronic device, such as asensor or control module, the method comprising determining, by aco-processor coupled to a main processor, that the main processor hasentered a quiescent state, starting a timer in response to determiningthat the main processor has entered the quiescent state, and waking themain processor upon expiration of the timer.

BRIEF DESCRIPTION OF THE DRAWINGS

The features, advantages, and objects of the present invention willbecome more apparent from the detailed description as set forth below,when taken in conjunction with the drawings in which like referencedcharacters identify correspondingly throughout, and wherein:

FIG. 1 is a simplified block diagram of a security system comprising acentral controller in wireless communication with a number ofbattery-powered, electronic devices;

FIG. 2 is a functional block diagram of one embodiment of one of thebattery-powered, electronic devices as shown in FIG. 1 ;

FIGS. 3A and 3B are flow diagrams illustrating one embodiment of amethod performed by a door/window sensor as shown in FIG. 2 forperforming timed functions;

FIG. 4 is a flow diagram illustrating one embodiment of a methodperformed by one of the electronic devices as shown in FIG. 1 forperforming battery level measurements;

FIGS. 5A and 5B are flow diagram illustrating one embodiment of a methodfor checking NVR values of one of the battery-powered, electronicdevices as shown in FIG. 1 during mass-production of electronic devices;and

FIG. 6 is a functional block diagram of one embodiment of a programmerthat is used to program an electronic device in accordance with theteachings herein.

DETAILED DESCRIPTION

The present application relates to a system, method and apparatus forperforming timed functions in a battery-powered, wireless electronicdevice, such as a sensor or control module. A “timed function” comprisesany function performed by an electronic device that is dependent ontime. Such an electronic device comprises a main processor and aco-processor. When the main processor enters a quiescent state in orderto preserve battery life, one or more timed functions are transferredfrom the main processor to the co-processor just before the mainprocessor enters the quiescent state. When the co-processor determinesthat it is time to perform the timed function, the co-processor wakesthe main processor in order for the main processor to perform the timedfunction.

FIG. 1 is a simplified block diagram of a security system 100 comprisinga central controller 102 in wireless communication with a number ofwireless, electronic devices 101, 103, 104, and 106, either directly (asshown by wireless signal 108) or indirectly (as shown by wirelesssignals 110, 112 and 114). Although a security system is shown in FIG. 1, and this disclosure discusses embodiments of the invention withrespect to a door/window sensor, it should be understood that theinventive concepts described herein could be alternatively applied toother battery-powered electronic devices, such as other types ofsecurity sensors, industrial sensors, and control modules found in homeautomation systems.

In some embodiments, two-way communications between/among centralcontroller 102 and one or more devices is possible while in otherembodiments, only one-way communications are possible. In the embodimentshown in FIG. 1 , two-way communications are possible between/amongcentral controller 102 and the electronic devices.

In one embodiment, security system 100 may utilize indirectcommunications as shown, commonly referred to as a “mesh” network. Amesh network provides for relaying messages between and among devices,or “nodes”, in order to extend the range of the network. In FIG. 1 ,device 104 is out-of-range from communicating directly with centralcontroller 102, but may nevertheless communicate with central controller102 via device 103, which relays messages between device 104 and centralcontroller 102, or device 101. Similarly, device 106 communicates withcentral controller 102 via device 104 and either device 103 or 101. Assuch, in this embodiment, each device in system 100 is capable of bothtransmitting and receiving messages from other devices and/or centralcontroller 102. In other embodiments, only direct communications arepossible.

The devices shown in FIG. 1 may comprise one or more different types ofsecurity sensors (door or window sensors, motion detectors, garage doortilt sensors, glass break sensors, etc.) and one or more “repeaters”that are typically AC-powered devices whose sole function is to relaymessages between devices. In FIG. 1 , device 103 is such a repeater,device 101 comprises a garage door tilt sensor, device 104 comprises adoor/window sensor and device 106 comprises a motion sensor. While onlythree types of sensors are shown in FIG. 1 , and only one of each sensortype, typically a plurality of door/window sensors are used in asecurity system, each to monitor a particular door or widow, and in somecases, more than one motion detector is used to detect motion in morethan one area of a home or business. Additionally, other types ofsensors could be used, such as one or more glass break sensors, shocksensors, cameras, etc. Finally, other components could be used in system100, such as one or more remote keypads that can arm and disarm system100, audio smoke alarm detectors, etc. Each one of the aforementionedcomponents may embody the transmission efficiency techniques discussedherein.

Door/window sensor 104 is used for monitoring a status of a door or awindow, such as when the door or window is opened or closed and, in someembodiments, when a door or window is locked or unlocked. In oneembodiment, door/window sensor 104 comprises a well-known reed-switchand magnet combination, where door/window sensor 104 detects door orwindow movement as the reed switch changes state when the magnet ismoved via door or window movement. In other embodiments, othertechniques are used to determine that status of a door or a window, suchas using an accelerometer to determine door or window movement.

When a door/window event occurs, door/window sensor 104 transmits astatus message, in one embodiment, comprising one or more encrypted datapackets or “frames” to central controller 102, either directly orthrough one or more other devices in system 100. The status messagecomprises an identification of a sensor that transmitted the statusmessage (such as its serial number, a pre-assigned string of numbersand/or letters such as a NodeID in an embodiment where a Z-Wave®protocol is used, or some other unique identifier), and an event typeindicating the type of event that occurred (i.e., door open, windowclosed, motion detected, etc.). Door/window sensor 104 may, in addition,transmit status messages, either at predetermined times or in responseto a request from central controller 102.

Door/window sensor 104 additionally transmits other types of messages inaddition to status messages, such as a tamper message (indicating thatdoor/window 104 has been tampered with), a heartbeat message (indicatingthat door/window sensor 104 is still functioning in system 100), and abattery status message (indicating a status of the battery life).

In one embodiment, after transmitting a status message or another typeof message, door/window sensor 104 waits a predetermined, configurableamount of time to receive an acknowledgement message, or ACK, fromcentral controller 102, or another device in system 100, to ensure thatthe message was successfully received by central controller 102. In oneembodiment, where messages are encrypted prior to transmission, after anACK is received, door/window sensor 104 waits a predetermined,configurable amount of time to receive a second response from centralcontroller 102, indicating that the message was successfully decrypted.If either the ACK or the response is not received with the configurable,predetermined time limits, door/window sensor 104 may retransmit theoriginal message. This process may be repeated a configurable number oftimes, as described in more detail later herein.

Central controller 102 comprises a security panel, which is a well-knowndevice used to monitor all of the sensors in system 100, and also may beused to notify one or more persons when an event is detected by one ofthe sensors. For example, if a door monitored by door/window sensor 104is opened, door/window sensor 104 transmits a message to centralcontroller 102 via repeater 103 indicative of the event, e.g., that adoor has been opened. In response, when security system 100 is armed,central controller 102 may cause a siren located inside and/or outside apremises monitored security system 100 to produce a very loud, audiblesiren, to cause one or more lights to turn on, to lock or unlock one ormore wireless locks, etc. Alternatively, or in addition, centralcontroller 102 may send an alert to a remote monitoring station thatmonitors thousands of security systems in order to dispatch relevantauthorities when an alarm is received from one of the security systems,typically after verification of the event by an employee of the remotemonitoring station.

In some embodiments, the functionality of central controller 102 may beperformed by a server located in “the cloud”, i.e., a server coupled toa gateway device within a home or business via the Internet. In thisembodiment, the gateway device receives event signals from the sensorsin system 100 and forwards them to the Internet-based server. The serverprocesses the signals and, as a result, may send commands to the gatewaydevice, such as commands that cause the gateway device to activate aloud siren, to cause one or more lights to turn on, to lock or unlockone or more wireless locks, etc. The server could, additionally, notifya remote monitoring station of events that occur. Thus, references madeto “central controller 102” herein shall also include Internet-basedprocessing devices, such as the cloud-based server.

Door/window sensor 104 performs one or more timed functions while in anormal mode of operation. A “timed function” comprises any functionperformed by door/window sensor 104 that is dependent on time. Forexample, door/window sensor 104 may be required to transmit a“heartbeat” signal once per hour, or to modulate an LED to illuminatefor two seconds upon transmission of any signal, re-transmit a messageafter not receiving an acknowledgement message after transmission of anoriginal message, etc.

FIG. 2 is a functional block diagram of one embodiment of abattery-powered, electronic device, such as door/window sensor 104, inaccordance with the teachings herein. Specifically, FIG. 2 shows mainprocessor 200, main processor memory 202, transceiver 204, co-processor206, co-processor memory 208, detector 210, indicator 212, tamperdetection device 214, indicator driver circuitry 218 and battery 220. Itshould be understood that these functional blocks may be coupled to oneanother in a variety of ways, and that not all functional blocksnecessary for operation of door/window sensor 104 are shown, forpurposes of clarity. It should be further understood that batterypowered, electronic devices other than a door/window sensor couldcomprise the same or similar functional blocks as shown in FIG. 2 , suchas different security sensors, industrial sensors, home automationcontrol modules (for controlling lights, HVAC systems, appliances,etc.), etc.

Main processor 200 is configured to provide general operation ofdoor/window sensor 104 by executing processor-executable instructionsstored in memory 202, for example, executable code. Processor 200 maycomprise a general purpose processor, such as an ADuC7024 analogmicrocontroller manufactured by Analog Devices, Inc. of Norwood Mass.,although any one of a variety of microprocessors, microcomputers, and/ormicrocontrollers may be used alternatively. Due to the relative smallsize of door/window sensor 104, and the fact that most door/windowsensor 104 are battery-powered, processor 200 is typically selected tohave low power consumption, small in size, and inexpensive to purchase.

Main processor 200 typically is tasked with performing “timed functions”i.e., any function performed by main processor 200 that is dependent ontime. For example, main processor 200 may be required to cause a“heartbeat” signal to be transmitted once per hour, or cause indicator212 to blink a predetermined number of times with one or morepredetermined times between illuminations, cause a message to bere-transmitted a predetermined amount of time after originaltransmission of the message, etc. Main processor 200 performs timedfunctions when door/window sensor 104 is operating in a “normal” stateof operation, i.e., while transmitting or receiving messages, processingsignals received from detector 210, etc. However, in order to savebattery life, main processor 200 may enter a quiescent state or mode ofoperation when door/window sensor 104 is relatively not busy, where mainprocessor 200 causes itself, and often other components, to either powerdown completely or be placed in a state of operation that consumes verylittle power, much less than when main processor 200, or othercomponents, operate in the normal mode of operation. Main processor 200exits the quiescent state and enters the normal mode of operation,typically when a signal is received from detector 210, indicating thatan event has occurred proximate to door/window sensor 104, such as adoor or window monitored by door/window 104 being opened. Main processor200 also exits the quiescent state and enters the normal state when itreceives an indication from co-processor 206, as described in furtherdetail below.

Main processor memory 202 is coupled to main processor 200 and comprisesone or more non-transitory information storage devices, such as RAM,ROM, flash, or other type of electronic, optical, or mechanical memorydevice. Memory 202 is used to store processor-executable instructionsfor operation of the door/window sensor 104 as well as any informationused by processor 200, such as threshold information, parameterinformation, identification information, current or previous door orwindow status information, etc. Main processor memory 202 excludespropagating signals.

Transceiver 204 is coupled to main processor 200 and comprises circuitryto transmit and receive radio-frequency signals between door/windowsensor 104 and central controller 102 and/or other electronic dives inproximity to door/window sensor 104, in the case where transceiver is amesh-network transceiver. In another embodiment, transceiver 204 isreplaced by a transmitter, in applications where door/window sensor 104does not require receiving capability. The radio-frequency signalscomprise upconverted and downconverted commands, status messages,requests, etc. Such circuitry is well known in the art and may compriseBlueTooth, Wi-Fi, Z-Wave®, Zigbee®, RF, optical, or ultrasoniccircuitry, among others.

In one embodiment, main processor 200, main processor memory 202 andtransceiver 204 are combined into a single module 216, such as the casewith a Z-Wave 700 series ZGM130S SIP Module in an embodiment thatutilizes the Z-wave 700 protocol. The ZGM130S SIP Module allowsmesh-type, wireless communications between door/window sensor 104 andcentral controller 102, either directly or through one or moreintermediate devices, such as repeater 103, and/or other devices insecurity system 100, such as device 101. In another embodiments, othersystem-on-chip modules provide functionality in place of main processor200, main processor memory 202 and transceiver 204, supporting othercommon mesh-network protocols such as Zigbee®, RF4CE, 6LoWPAN,WirelessHART EnOcean, ISAIOO.11a, IEEE 802.15.4 and/or others.

Co-processor 206 is coupled to main processor 200 and is configured toperform certain timed functions normally performed by main processor 200while main processor, and other components, such as transceiver 204,memory 202, and driver circuitry 218 are in the quiescent state.Co-processor 206 comprises one or more microprocessors,microcontrollers, custom ASICs and/or discreet electronic components toperform the functionality of co-processor 206. For example, co-processor206 may comprise a PIC processor or one of a line of STM8 processorsmanufactured by STMicroelectronics of Geneva, Switzerland. Co-processor206 is typically chosen with factors such as size, cost and powerconsumption in mind.

Co-processor memory 208 is coupled to co-processor 206 and comprises oneor more non-transitory information storage devices, such as RAM, ROM,flash, or other type of electronic, optical, or mechanical memorydevice. Co-processor memory 208 is used to store processor-executableinstructions for operation of co-processor 206 as well as anyinformation used by co-processor 208, such as identifications of timedfunctions and parameters thereto, as will be described later herein.Co-processor memory 208 excludes propagating signals. It should beunderstood that in many embodiments, co-processor memory 208 isincorporated into co-processor 206 in the form of on-board flash and/orROM storage.

Detector 210 is coupled to processor 200 and reports, monitors ordetermines a state, physical condition, attribute, status, or parameterof something, such as the status of a door, window, gate, or otherentrance or exit barrier (e.g., open, closed, locked, unlocked, etc.), atemperature, a humidity, motion, shock/vibration, glass breakage, etc.Detector 204 may comprise a reed switch, an ultrasonic transceiver, aninfrared transceiver, a tilt sensor, an accelerometer, a motion sensor,microphone, or some other device to report, monitor or determine astate, physical condition, attribute, status, or parameter of a thing orarea in proximity to door/window sensor 104.

Indicator driver circuitry 218 is coupled to main processor 200, whichin turn is coupled to indicator 212, for providing an audible and/orvisual indication that an event, such as transmission, learn status,tamper, etc., has, is or has just occurred. Door/window sensor 104 maytransmit a number of different types of signals, including a“door/window open” message, a tamper message, a heartbeat message, abattery low message, or initialization messages when door/window sensor104 is enrolled into central controller 102. Prior to, during or afteran event, main processor 200 causes indicator 212 to illuminate/sound byfirst energizing driver circuitry 218 (in cases where driver circuitry218 is held in a quiescent state until needed), and then causing thedriver circuitry to energize indicator 212, either for a predeterminedtime period or in some sort of modulated fashion, i.e., blinking and/orsounding a number of times, to indicate, in some embodiments, a type ofevent that will, is or has occurred. Driver circuitry 218 comprisescircuitry well known in the art for causing indicator 212 toilluminate/sound. When driver circuitry 218 is energized, it may draw ameasurable amount of current from battery 220 and an increase in thecurrent draw as current driver 218 energizes indicator 212.

Tamper detection device 214 is coupled to main processor 200 and is usedto detect tampering with door/window sensor 104, for example, disablingdoor/window sensor 104, typically by removing a cover of door/windowsensor 104 and removing the battery. Tamper detection device 214typically comprises a switch that is depressed when a cover ofdoor/window sensor 104 is installed over a reciprocal housing thatcontains the electronics of door/window sensor 104. The cover istypically manufactured with a physical protrusion that is designed todepress tamper detection device 214 when the cover has been installed.When the cover is removed, the switch changes state, causing mainprocessor 200 to detect this state change. In some embodiments, mainprocessor 200 “latches” any indication of tampering from tamperdetection 214, noting the day and time that a tamper was detected, andstores this information in main processor memory 202. In this way, mainprocessor 200 may indicate tampering to central controller 102 at alater time, thus potentially saving battery life.

Battery 220 is coupled to some or all of the functional blocks shown inFIG. 2 to provide a DC voltage for each component from which to operate.In some embodiments, the voltage from battery 220 is provided to avoltage regulator, which produces one or more other voltages for certaincomponents of door/window sensor 104. Battery 220 typically produces avoltage output of between 3 and 5 volts DC. Battery 220 is selectedbased on operating voltages of the various components of door/windowsensor 104, size, cost and a charge that can be delivered by thebattery, in amp-hours or milli-amp hours. Popular choices for battery220 include a CR123A “barrel” type battery or a CR2477 coin cellbattery.

FIG. 3 is a flow diagram illustrating one embodiment of a methodperformed by a battery-powered, electronic device, such as door/windowsensor 104, for performing timed functions. It should be understood thatalthough the method is described in terms of a home security door orwindow sensor, the concepts described with respect to the method couldbe used in other types of security sensors, industrial sensors andcontrol modules. It should be understood that in some embodiments, notall of the steps shown in FIG. 3 are performed. It should also beunderstood that the order in which the steps are carried out may bedifferent in other embodiments.

At block 300, door/window sensor 104 is operating in normal mode, i.e.,most or all of the functional blocks in FIG. 2 fully powered andoperational, with main processor 200 transmitting status messages,receiving information from another node or from central controller 102,processing signals from detector 210, etc. Main processor 200 alsoexecutes one or more timed functions, i.e., periodic transmissions of“heartbeat” signals, modulation of indicator 212 upon the occurrence ofcertain events, such as message transmission, enrolling into centralcontroller 102, detecting tampering, etc., message re-transmission aftera certain time period, etc.

At block 302, main processor 200 determines that it will enter aquiescent mode of operation, i.e., a mode of operation where mainprocessor 200, as well as one or more other components, operate in anunpowered or low-power consumption state. The determination is typicallymade when main processor 200 is relatively inactive for a predeterminedamount of time, such as for three seconds, i.e., it is not processingsignals from detector 210, or actively transmitting or receivinginformation via transceiver 204. In another example, main processor 200determines that it will enter the quiescent mode when it determines thatit must stay in the normal mode for more than a predetermined, desirabletime period in order to perform a timed function. For example, if mainprocessor 200 is performing a timed function of blinking indicator 212 3times (for a total of 3 seconds), followed by a lull time of 10 seconds(for example, to indicate tampering of door/window sensor 104), mainprocessor 200 determines that it will enter the quiescent state if thepredetermined, desirable time is set to 4 seconds, as the 10 second lulltime exceeds the predetermined, desirable time More generally, mainprocessor 200 may determine to enter the quiescent state when mainprocessor 200 is performing a timed function and at least some of thetimed function requires waiting for a particular time to elapse, orwaiting for a particular time to arrive, where the wait time exceeds thepredetermined, desirable time period.

At block 304, in response to determining that main processor 200 willenter the quiescent mode of operation, main processor 200 retrieves anidentification of one or more timed functions being processed by mainprocessor 200, as well as one or more parameters associated with eachtimed function from a volatile memory (such as RAM) of main processormemory 202. For example, main processor 200 may executing three timedfunctions simultaneously: periodic transmission of a heartbeat message,causing indicator 212 to blink at a rate of one per second for half asecond for three times, off for 10 seconds, and then repeating, toindicate that tamper detection device 214 has detected tampering, and aretransmission function to re-send a message via transceiver 204 if anacknowledgement message is not received from central controller 102after initial transmission of the message.

In another embodiment, main processor 200 retrieves an identification ofone or more timed functions and associated parameters associated witheach timed function and passes them to co-processor 206 without adetermination that main processor 200 will enter the quiescent state. Inthis embodiment, each time that main processor 200 starts a timedfunction, an identification of the timed function and a parameterassociated with the function, such as time when action is needed tocontinue performing the timed event, is passed from main processor 200to co-processor 206. Co-processor 206 manages the timed function,generally, be starting a timer to determine when the time has elapsedand then notifying main processor 200. Main processor 200 may or may notbe in a quiescent state when notification is provided.

In the case of the heartbeat timed function, main processor 200 maymonitor a software heartbeat countdown timer that indicates a remainingtime left before a new heartbeat message should be transmitted. Thecountdown timer is reset and initiated after transmission of a heartbeatmessage, and set to a relatively long time period, such as one hour, oneday or something in between. When main processor 200 determines it willenter the quiescent state, main processor retrieves an identification ofthe heartbeat function from main processor memory 202 as well as aparameter related to the heartbeat function, in this case, the timeremaining on the heartbeat countdown timer. In this example, theremaining time left before transmission of the next heartbeat signal is39 minutes. Of course, instead of a countdown timer, main processor 200could initiate and monitor a timer that counts up to a predeterminednumber and transmit a heartbeat message when the timer equals thepredetermined number. All such “countdown” timers referenced hereincould alternatively be “count up” timers.

In the case of the blink timed function, the parameters may comprise astatus of indicator 212 (i.e., “on”, “off”), a “lull” time, i.e., a timeperiod in between a series of blinks of indicator 212 (i.e., tenseconds), an “on” time”, i.e., how long indicator 212 isilluminated/sounded during a blink, an “off” time, i.e., how longindicator 212 is off during a blink series, and a number of blink cycles(i.e., perform a blink cycle 3 ties). The parameters may also comprise aremaining time of any point during the blink function, i.e., 200 msremaining for illumination of indicator 212 during a particular blink.When main processor 200 determines it will enter the quiescent state,main processor retrieves an identification of the blink function frommain processor memory 202 as well as the parameters related to the blinkfunction, in this case, the on time during blinks (in this case, half asecond), the off time during blinks (in this case, one second), a numberof times to repeat each on/off cycle (in this case, 3), the lull time(in this case, ten seconds) and an indication of where in the cycle theblind function is presently, i.e., 200 ms left in the secondillumination out of three blinks.

In another embodiment, the parameters of the blink timed functioncomprise only a single, remaining time for a remaining portion of theblink function and a current status of indicator 212, such as “on” or“off”. Using the example above, the parameters comprise 10 seconds asthe time remaining to wake main processor 200 and an indication thatindicator 212 is presently not illuminated (conversely, a state thatindicator 212 should be placed upon expiration of the 10 second timeperiod, i.e., that indicator 212 should be illuminated when the 10second time period elapses).

In the case of the retransmit timed function, main processor 200 maymonitor a software retransmit countdown timer that indicates a remainingtime left before retransmission of a message that was previouslytransmitted. The retransmit countdown timer is reset and initiated afteran initial transmission, or a re-transmission, of a message. Forexample, the retransmit countdown timer could be set to thirty secondsafter transmission of a message via transceiver 204. If anacknowledgement message is not received from central controller 102within thirty seconds, the retransmit countdown timer expires, and mainprocessor 200 retransmits the message, resetting the retransmitcountdown timer once again. When main processor 200 determines it willenter the quiescent state, main processor retrieves an identification ofthe retransmit function from main processor memory 202 as well as aparameter related to the retransmit function, in this case, the timeremaining on the retransmit countdown timer, equal to 27 seconds, inthis example. In another embodiment, an additional parameter may beretrieved from main processor memory 202 indicating a number ofretransmissions remaining before canceling any further retransmissions.

At block 306, main processor 200 provides the timed functionidentifications and related parameters for each to co-processor 206.

At block 308, main processor 200 provides notice to co-processor 206that it is about to enter the quiescent state. In another embodiment, nonotice is provided. Rather, providing the timed function identificationsand parameters acts as notice to co-processor 206 that main processor200 is about to enter the quiescent state.

At block 308, main processor 200 may cause removal of power from one ormore other components of door/window sensor 104 and/or may cause one ormore components to operate in a low-power consumption state. Forexample, main processor 200 may remove power from at least a portion ofmain processor memory 202, such as a RAM portion of main processormemory 202, and transceiver 204. Removing power from RAM causes thetimed function identifications and any parameters related to the timedfunctions to become erased. After the components have been eitherpowered off or powered into a low-power consumption state, mainprocessor 200 enters a quiescent state of operation, reducing its powerconsumption considerably but remaining ready to respond to wake signalsprovided by co-processor 206 or signals from detector 210.

At block 310, co-processor 206 receives the timed functionidentifications and parameters related to each of the timed functionidentifications.

At block 312, co-processor 206 stores the timed function identificationsand parameters related to each of the timed function identifications inco-processor memory 208.

At block 314, co-processor 206 initiates one or more timers associatedwith the timed function identifications and the parameters. For example,co-processor 206 starts a heartbeat timer related to the heartbeat timedfunction, a blink timer related to the blink timed function, and aretransmit timer related to the retransmit timed function. Each timer isset to a value as provided in a respective parameter as provided by mainprocessor 200. For example, the heartbeat timer is set to 39 minutes. Ablink timer is set to 10 seconds, representing the long lull time thatindicator 212 remains extinguished/silent in between blink sequences.Finally, a retransmit timer is set to 27 seconds, representing the timeremaining to retransmit the message originally transmitted bytransceiver 204 if an acknowledgement is not received.

At block 316, transceiver 204 may receive an acknowledgment message fromcentral controller 102, in response to transceiver 204 previouslysending a status message to central controller 102. In this case,transceiver may maintain either a low power or fully powered state whilemain processor 200 and/or one or more other components are in aquiescent state. If an acknowledgement message is received, transceivermay cause main processor 200 to exit the quiescent state in order toprocess the acknowledgment message. In response, main processor 200 mayexit the quiescent state into the normal state, or into a low-powerstate specifically to process the acknowledgement message. Mainprocessor 200 may then cancel the retransmit timed function by eithernotifying co-processor 206, causing co-processor 206 to cancel theretransmit function, i.e., the timer associated with retransmission, ormain processor 200 may store an indication in main processor memory 202to ignore a wake up signal from co-processor 206 when the retransmittimer expires as monitored by co-processor 206. In the latter case, mainprocessor 200 stores a timed function identification of the retransmitfunction in main processor memory 202 and an indication, such as a “1”or a “0” to indicate to main processor 200 to ignore a wake signal fromco-processor 206 when the retransmit time expires.

At block 318, co-processor determines that one or more of the timers hasexpired, indicating that it is time to perform one of the timedfunctions. In this example, the blink timer expired, indicating that itis now time to illuminate indicator 212.

At block 320, in response to the blink timer expiring, co-processor 206wakes main processor 200, typically by sending an interrupt to mainprocessor 200. Main processor 200, in turn, returns itself and one ormore other components to the normal state.

At block 322, co-processor 206 retrieves the timed functionidentification related to the blink function, and in some embodiments,updated parameter information, such as information pertaining to whetherto illuminate or extinguish indicator 212 or a number of times remainingto perform the blink timed function. In one embodiment, co-processor 206also provides a time that indicator 212 should remain illuminated or,more generally, a time for a next portion of the blink function.Co-processor 206 then sends the timed function ID and updatedparameter(s) to main processor 200.

In one embodiment, co-processor 206 also provides updated parameters tomain processor 200 relating to the other timed functions whose timersdid not expire. For example, when the blink timer expires, co-processor206 also provides main processor with the time remaining on theheartbeat timer (i.e., 26 minutes and 800 ms) and retransmit timer(i.e., 26 seconds and 800 ms).

At block 324, main processor 200 receives at least the timed functionidentification of the blink function, and the updated parameterinformation indicating that main processor 200 should illuminate/soundindicator 212. In another embodiment, main processor 200 receives anadditional parameter, such as a number of times remaining to perform theblink function.

At block 326, main processor 200 stores the received timed functionidentification information and updated parameters in main processormemory 202.

At block 328, main processor 200 executes the timed function using theupdated parameters received from co-processor 206 at block 322. Forexample, main processor sets a heartbeat timer to 38 minutes and 800 ms,illuminates/sounds indicator 212 and sets an blink timer for one second(representing the first blink of the blink sequence, and a retransmittimer to 26 seconds and 800 ms, and then starts all three timers.

At block 330, blocks 302 through 328 are repeated as necessary.

FIG. 4 is a flow diagram illustrating one embodiment of a methodperformed by a battery-powered, electronic device, such as door/windowsensor 104, for performing battery level measurements. It should beunderstood that although the method is described in terms of a homesecurity door or window sensor, the concepts described with respect tothe method could be used in other types of security sensors, industrialsensors and control modules. It should be understood that in someembodiments, not all of the steps shown in FIG. 4 are performed. Itshould also be understood that the order in which the steps are carriedout may be different in other embodiments. It should be furtherunderstood that while the method is described in terms of main processor200 of FIG. 2 , the concepts described by the method could be applied inapplications where no co-processor is used.

At block 400, main processor 200 generates a message for transmission tocentral controller 102. The message may be in response to main processor200 receiving one or more signals from detector 210, or upon expirationof a timer of a timed function, such as expiration of a heartbeat timeror a retransmit timer. The message may alternatively be generated inresponse to transceiver 204 receiving a status request from centralcontroller 102, asking door/window sensor 104 to transmit a status of adoor or window being monitored.

At block 402, in response to receiving one or more signals from detector210, or upon expiration of a timer of a timed function, main processor200 prepares to transmit a message and/or energize indicator 212 byenergizing one or more components of door/window sensor 104, such astransceiver 204 in preparation for transmitting a message to centralcontroller 102 and/or driver circuitry in preparation forilluminating/sounding indicator 212. Energizing these components placesan additional current draw on battery 220. Energizing transceiver 204and/or the driver circuitry 218 does not mean that transceiver 204 istransmitting or receiving messages, or that indicator 212 isilluminated/sounding.

At block 404, main processor 200 performs a battery level check whenmost or all of the components of door/window sensor 104 are no longer ina quiescent state, including transceiver 104 and/or driver circuitry218. Main processor 200 performs a battery level check by measuring a DCvoltage of battery 220 while most or all of the components ofdoor/window sensor 104 are no longer in a quiescent state, i.e.,energized by necessarily active (“active” meaning, for transceiver 204,transmitting or receiving a message and, for driver circuitry 218,causing indicator 212 to illuminate/sound).

At block 406, main processor 200 stores the battery voltage readingtaken at block 404 in main processor memory 202, for possibletransmission to central controller 102.

At block 408, main processor 200 causes transceiver 204 to transmit amessage and/or indicator 212 to illuminate/sound. It should beunderstood that in another embodiment, the battery level check of block404 occurs immediately after transmission of a message and/orimmediately after illumination/sounding of indicator 212.

FIG. 5 is a flow diagram illustrating one embodiment of a method forchecking non-volatile register (NVR) values of an electronic device,such as door/window sensor 104, during mass-production of door/windowsensor 104. It should be understood that although the method isdescribed in terms of checking a home security door or window sensor,the concepts described with respect to the method could be used to checkother types of security sensors, industrial sensors and control modules.It should be understood that in some embodiments, not all of the stepsshown in FIG. 5 are performed. It should also be understood that theorder in which the steps are carried out may be different in otherembodiments. It should be further understood the method may be used inapplications with or without the use of a co-processor. For purposes ofillustration, the method of FIG. 5 will be discussed assuming that noco-processor is used.

The method of FIG. 5 is typically used in a mass-productionmanufacturing factory to check NVR values stored in a non-volatilememory area of main processor memory 202 before units leave the factory.In the past, checking the NVR values has not been conducted, due to therelative inaccessibility of NVR values on the production line. Ensuringthat each unit is properly programmed with the correct NVR values avoidsfailures in the field and the costs associated with returns.

Generally, NVR values comprise numerical constants that are used by mainprocessor 200 to perform the functionally of door/window 104. Examplesof such numerical constants comprise a standard, or maximum,transmission power level, a number of transmission re-tries whentransmission of a message is not acknowledged, “lock bits” that indicateportions of memory 202 that may, or may not, not be overwritten byprocessor 200 (such as in the case of an over-the-air firmware updateafter door/window sensor 104 has been installed in the field, where thelock bits allow portions of memory 202 to be overwritten with a firmwareupdate provided over-the-air), etc. Other examples comprise an NVR “Rev”constant, an NVR “PINS” constant, and NVR “NVMCS” constant, an NVR“NVMT” constant, an NVR “NVMS” constant, an NVR “NVMP” constant, an NVR“HW” constant, and an application serial number constant.

FIG. 6 is a functional block diagram of door/window sensor 104 beingtested in a factory setting using programmer 600. After door/windowsensor 104 has been assembled with the various components that comprisedoor/window sensor 104 (i.e., processor 200, memory 202, sensor(s) 218,etc.), programmer 600 is electronically coupled to door/window sensor104 via, in one embodiment, an interface cable 608 to load a firstportion of processor memory 202 with application firmware 602 forcausing main processor 200 to perform the functionality of door/windowsensor 104, as well as for loading a second portion of main processormemory 202 with NVR values 604 (door/window sensor 104 shown in FIG. 6omits all components except for main processor memory 202 for purposesof clarity). Interface cable 604 may comprise a multi-connector,parallel or serial bus, utilizing, in one embodiment a UART built intomain processor 200 and programmer 600. Both application firmware 602 andNVR values 604 are stored in programmer memory 606. The applicationfirmware 602 comprises a self-test and reference NVR values that arecompared to the NVR values stored in the second portion of mainprocessor memory 202.

Referring back to the method of FIG. 5 , at block 500, door/windowsensor 104 has been manufactured to a point where all or most of theprimary components have been installed onto a circuit board ofdoor/window sensor 104, i.e., soldered in place. In one embodiment mainprocessor 200, main memory 202 and transceiver 204 are incorporated intoa Z-wave 700 series ZGM130S SIP Module.

At block 502, programmer 600 is coupled to door/window sensor 104,typically via a serial port of main processor 200, although in otherembodiments, one or more other serial ports and/or parallel ports areused.

At block 504, programmer 600 loads compiled application firmware 602into main processor memory 202. The compiled application firmware 602comprises processor-executable instructions for main processor 200 toperform the functionality of door/window sensor 104. For example, todetect when a door or window has been opened, to communicate withcentral controller 102, to perform overhead functions, such astransmission of a tamper message when door/window sensor 104 has beentampered with, a battery-low indication message when battery 220 is low,transmission of a variety of status messages, etc. The compiledapplication firmware 602 additionally comprises a self-test andreference NVR values, which will be explained in more detail below.

At block 506, programmer 600 loads the NVR values into the secondportion of main memory 202.

At block 508, main processor 200 receives an indication to start theself-test. In one embodiment, the indication comprises a voltage changein a test point coupled to main processor 200, for example, asprogrammer 600 causes the test point to become grounded. Of course,other methods could be used to cause main processor 200 to start theself-test, as is known in the art.

At block 510, main processor 200 starts the self-test by executing aportion of the processor-executable code loaded into the first portionof main memory 202. The self-test comprises one or more comparisonsbetween NVR values stored in the second portion of main processor memory202 with the reference values defined in the application firmware 602.Such reference values may be defined in source code of the applicationfirmware 602 as constants. For example, in C programming language, aconstant may be defined by the #define preprocessor directive or the“const” keyword, as well known in the art. The reference values maydefine NVR values such as the maximum transmission power allowed, lockbits that indicate which areas of main processor memory 202 may beoverwritten by application code 602, one or more encryption keys, etc.,and an address in main processor memory corresponding to each referencevalue.

At block 512, main processor determines which area(s) of the secondportion of main processor memory 202 it will read, based on the addressinformation of the reference values found in the application firmware602.

At block 514, main processor 200 reads one or more NVR values from thesecond portion of main memory 202 at address(es) specified in theapplication firmware 602.

At block 516, main processor 200 compares the NVR value(s) from thesecond portion of main memory 202 with the reference values defined inthe application firmware 602.

At block 518, if main processor 200 determines that all of the NVRvalues from the second portion of main memory 202 match the referencevalues defined in the application firmware 602, main processor 200provides an indication of such. In one embodiment, main processor 200causes indicator 212 to illuminate/sound in a way that conveys thematch. For example, main processor 200 may cause indicator 212 toilluminate/sound steadily, blink or sound at a first rate, etc.Alternatively, or in addition, main processor 200 generates a messageindicating that all of the values matched, and provides the message toprogrammer 600, which stores the message in association with door/windowsensor 104, for example, in association with a serial number ofdoor/window sensor 104. In one embodiment, the message may be providedto programmer 600, for example, via an interface cable 608 betweenprogrammer 600 and door/window sensor 104.

At block 520, when main processor 200 determines that all of the NVRvalues from the second portion of main memory 202 match the referencevalues defined in the application firmware 602, main processor 200 mayconfigure another component of door/window sensor 104, such astransceiver 204, with one or more of the NVR values stored in the secondportion of main processor memory 202.

At block 522, if main processor 200 determines that not all of the NVRvalues from the second portion of main memory 202 match the referencevalues defined in the application firmware 602, main processor 200provides an indication, different than the indication described at block518, in a way that conveys the mis-match. For example, main processor200 may cause indicator 212 to illuminate/sound steadily, blink or soundat a second rate, etc. Alternatively, or in addition, main processor 200generates a message indicating that not all of the values matched, andprovides the message to programmer 600, which stores the message inassociation with door/window sensor 104, for example, in associationwith a serial number of door/window sensor 104. In one embodiment, themessage comprises an ASCII-coded indication of each value and whethereach value in the second portion of main processor memory 202 matched acorresponding reference value defined by the application firmware 602,along with, in one embodiment, the actual values read from the secondportion of main processor memory 202 and corresponding reference valuesas defined by the application firmware 602. In another embodiment, themessage comprises only the values that did not match each other. In anycase, the message may be provided to programmer 600, for example, via ainterface cable 608 connection between programmer 600 and door/windowsensor 104.

At block 524, when main processor 200 determines that not all of the NVRvalues from the second portion of main memory 202 match the referencevalues defined in the application firmware 602, main processor 200 mayrefrain from configuring another component of door/window sensor 104with at least one or more of the NVR values from the second portion ofmain memory 202. For example, main processor 200 may not configuretransceiver 204 with a maximum transmission power level value stored inthe second portion of main processor memory 202. In another embodiment,main processor 200 configures one or more other components using one ormore NVR values from the second portion of main memory 202 if thosevalues match the reference values defined by the application firmware602, and one or more reference values defined by the applicationfirmware 602 for NVR values that do not match the reference valuesdefined by the application firmware 602.

The methods or algorithms described in connection with the embodimentsdisclosed herein may be embodied directly in hardware or embodied inprocessor-readable instructions executed by a processor. Theprocessor-readable instructions may reside in RAM memory, flash memory,ROM memory, EPROM memory, EEPROM memory, registers, hard disk, aremovable disk, a CD-ROM, or any other form of storage medium known inthe art. An exemplary storage medium is coupled to the processor suchthat the processor can read information from, and write information to,the storage medium. In the alternative, the storage medium may beintegral to the processor. The processor and the storage medium mayreside in an ASIC. The ASIC may reside in a user terminal. In thealternative, the processor and the storage medium may reside as discretecomponents.

Accordingly, an embodiment of the invention may comprise acomputer-readable media embodying code or processor-readableinstructions to implement the teachings, methods, processes, algorithms,steps and/or functions disclosed herein.

While the foregoing disclosure shows illustrative embodiments of theinvention, it should be noted that various changes and modificationscould be made herein without departing from the scope of the inventionas defined by the appended claims. The functions, steps and/or actionsof the method claims in accordance with the embodiments of the inventiondescribed herein need not be performed in any particular order.Furthermore, although elements of the invention may be described orclaimed in the singular, the plural is contemplated unless limitation tothe singular is explicitly stated.

I claim:
 1. A battery-powered, electronic device, comprising: a firstmemory for storing main processor-executable instructions; a secondmemory for storing co-processor-executable instructions; a mainprocessor coupled to the first memory for executing the mainprocessor-executable instructions; and a co-processor coupled to themain processor and the second memory for executing theco-processor-executable instructions that causes the co-processor to:determine that the main processor has entered a quiescent state; start atimer in response to determining that the main processor has entered thequiescent state; and upon expiration of the timer, wake the mainprocessor from the quiescent state and send an identification of a timedfunction to the main processor, the timed function comprising a functionperformed by the main processor that is dependent on time; wherein themain processor performs the timed function after receiving theidentification from the co-processor.
 2. The electronic device of claim1, wherein the co-processor instructions that causes the co-processor todetermine that the main processor has entered a quiescent statecomprises instructions that causes the co-processor to: receive amessage from the main processor, the message comprising an indicationthat the main processor is entering the quiescent state and a parameterassociated with the timed function.
 3. The electronic device of claim 2,further comprising: a transceiver coupled to the main processor; whereinthe timed function comprises periodic transmission of a heartbeatsignal, and the parameter comprises a time remaining until the heartbeatsignal should be transmitted by the transceiver.
 4. The electronicdevice of claim 2, wherein the co-processor instructions that causes theco-processor to wake the main processor comprises instructions thatcauses the co-processor to: send an updated parameter associated withthe timed function to the main processor; wherein the main processorperforms the timed function using the updated parameter.
 5. Theelectronic device of claim 2, wherein the electronic device furthercomprises: an indicator coupled to the main processor; wherein the timedfunction comprises illuminating the indicator, and the parametercomprises a time remaining to extinguish the indicator.
 6. Theelectronic device of claim 4, wherein the electronic device furthercomprises: an indicator coupled to the main processor; wherein the timedfunction comprises illuminating the indicator, and the updated parametercomprises a remaining time duration to illuminate the indicator.
 7. Theelectronic device of claim 5, wherein the co-processor instructions thatcauses the co-processor to wake the main processor comprises furtherinstructions that causes the co-processor to: send a second parameterassociated with the timed function to the main processor, the secondparameter comprising a number of remaining times to illuminate theindicator.
 8. The electronic device of claim 6, wherein the co-processorinstructions that causes the co-processor to wake the main processorcomprises further instructions that causes the co-processor to: send asecond parameter associated with the timed function to the mainprocessor, the second parameter comprising a number of remaining timesto illuminate the indicator.
 9. The electronic device of claim 2,further comprising: a transceiver coupled to the main processor; whereinthe main processor-executable instructions comprise instructions thatcauses the main processor to: retrieve, from the first memory, theparameter; generate the message, comprising the indication and theparameter; send the message to the co-processor; and cause the mainprocessor, the first memory and the transceiver to enter the quiescentstate; wherein the parameter is erased from the first memory prior tothe main processor entering the quiescent state.
 10. The electronicdevice of claim 2, further comprising: a transceiver coupled to the mainprocessor; wherein the timed function comprises retransmitting a statusmessage previously transmitted by the transceiver, and the parametercomprises a time to retransmit the status message.
 11. A method forperforming timed functions in a battery-powered, wireless electronicdevice, comprising: determining, by a co-processor of thebattery-powered, wireless electronic device, that a main processorcoupled to the co-processor has entered a quiescent state; starting, bythe co-processor, a timer in response to determining that the mainprocessor has entered the quiescent state; and upon expiration of thetimer, waking, by the co-processor, the main processor from thequiescent state and sending, by the co-processor, an identification of atimed function to the main processor, the timed function comprising afunction performed by the main processor that is dependent on time;wherein the main processor performs the timed function after receivingthe identification from the co-processor.
 12. The method of claim 11,wherein determining that the main processor has entered a quiescentstate comprises: receiving, by the co-processor, a message from the mainprocessor, the message comprising an indication that the main processoris entering the quiescent state and a parameter associated with thetimed function.
 13. The method of claim 12, wherein the timed functioncomprises periodic transmission of a heartbeat signal by a transceivercoupled to the main processor, and the parameter comprises a timeremaining until the heartbeat signal should be transmitted by thetransceiver.
 14. The method of claim 12, wherein waking the mainprocessor comprises: sending, by the co-processor, an updated parameterassociated with the timed function to the main processor; wherein themain processor performs the timed function using the updated parameter.15. The method of claim 12, wherein the timed function comprisesilluminating an indicator coupled to the main processor, and theparameter comprises a time remaining to extinguish the indicator. 16.The method of claim 14, wherein the timed function comprisesilluminating an indicator coupled to the main processor, and the updatedparameter comprises a remaining time duration to illuminate theindicator.
 17. The method of claim 15, wherein waking the main processorcomprises: sending, by the co-processor, a second parameter associatedwith the timed function to the main processor, the second parametercomprising a number of remaining times to illuminate the indicator. 18.The method of claim 16, wherein waking the main processor comprises:sending, by the co-processor, a second parameter associated with thetimed function to the main processor, the second parameter comprising anumber of remaining times to illuminate the indicator.
 19. The method ofclaim 12, further comprising: retrieving, by the main processor, theparameter from a first memory coupled to the main processor; generating,by the main processor, the message, comprising the indication and theparameter; sending, by the main processor, the message to theco-processor; and causing, by the main processor, the first memory andthe transceiver to enter the quiescent state; wherein the parameter iserased from the first memory prior to the main processor entering thequiescent state.
 20. The method of claim 12, wherein the timed functioncomprises retransmitting a status message previously transmitted by atransceiver coupled to the main processor, and the parameter comprises atime to retransmit the status message.